<template>
  <div style="background: #409EFF">

    <el-row class="onerow">
      <img src="../assets/yasuo.png" width="80px" height="80px" style="border-radius: 80px;"/>
    </el-row>

    <el-row class="onerow">
      <div style="text-align: center;color: #fff;margin: 10px;">
        <span>admin&nbsp;&nbsp;&nbsp;&nbsp;系统管理员</span><br/>
        <span style="margin-top: 10px;">注册时间：2018年3月12日</span>
      </div>
    </el-row>
    <el-row>
      <el-col :span="12" style="display: flex;justify-content: center;">
        <el-button type="danger" size="small">修改密码</el-button>
      </el-col>
      <el-col :span="12" style="display: flex;justify-content: center;">
        <el-button type="success" size="small" @click="logout">注销登录</el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  import axios from 'axios'

  export default {

    methods: {
      logout() {
        var that = this;
        axios.get("/sys/logout").then(res => {
          sessionStorage.removeItem("menus");
          that.$router.push("/")
        })
      }

    }
  }
</script>

<style>
  .onerow {
    display: flex;
    justify-content: center;
  }
</style>
